<!-- templates/index.html -->
<!DOCTYPE html>
<html>
<head>
    <title>文本转语音</title>
    <style>
        .container { max-width: 800px; margin: 50px auto; padding: 20px; }
        textarea { width: 100%; height: 150px; margin: 10px 0; }
        .error { color: red; }
    </style>
</head>
<body>
    <div class="container">
        <h1>文本转语音转换器</h1>
        {% if error %}
            <p class="error">{{ error }}</p>
        {% endif %}
        <form method="POST">
            <textarea name="text" placeholder="请输入要转换的文本（最多500字）" 
                     maxlength="500" required></textarea>
            <button type="submit">生成语音</button>
        </form>
    </div>
</body>
</html>
